-- GENERATED SPELL FOR [Iron Rune Binder] --


function spell0_23796(pUnit, Event) --@Bind Stone Giant,n/a--
pUnit:FullCastSpellOnTarget(43270,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23796', 33000, 1)
end

function spell1_23796(pUnit, Event) --@Flame Shock,n/a--
pUnit:FullCastSpellOnTarget(15039,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23796', 12000, 1)
end

function spell2_23796(pUnit, Event) --@Rune of Binding,n/a--
pUnit:FullCastSpellOnTarget(48599,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23796', 7000, 1)
end

function Sorts_23796(pUnit, Event)
local choix_sorts_23796 = math.random(0, 2)
if choix_sorts_23796 == 0 then
pUnit:RegisterEvent('spell0_23796', 1, 1)
end
if choix_sorts_23796 == 1 then
pUnit:RegisterEvent('spell1_23796', 1, 1)
end
if choix_sorts_23796 == 2 then
pUnit:RegisterEvent('spell2_23796', 1, 1)
end
end

function mob23796_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23796', math.random(1500, 3000), 1)
end

function mob23796_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23796_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23796_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23796, 1, 'mob23796_Action')
RegisterUnitEvent(23796, 2, 'mob23796_Leave')
RegisterUnitEvent(23796, 3, 'mob23796_Kill')
RegisterUnitEvent(23796, 4, 'mob23796_Die')
